package com.xdj.iot.util.excelUtils.processor.processorImpl;

import com.xdj.iot.util.excelUtils.ExcelAssistBean;
import com.xdj.iot.util.excelUtils.ExcelUtil;
import com.xdj.iot.util.excelUtils.processor.ExcelProcessor;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;

/**
 * created by chongyahhh
 * 2020/2/22
 * excel 表格标准增强 -> 表头不作处理，列宽自适应
 */
public class StandardExcelProcessor implements ExcelProcessor {
    @Override
    public Integer customOperationBeforeInvokeData(ExcelAssistBean excelAssistBean, HSSFSheet currentSheet) {
        return 0;
    }

    @Override
    public void customOperationAfterInvokeData(ExcelAssistBean excelAssistBean, HSSFSheet currentSheet, int firstRowNum) {
        ExcelUtil.RowWidthAutoFix(excelAssistBean,currentSheet,firstRowNum);
    }
}
